Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log rewrite #107

Merged
merged 13 commits into from
May 18, 2024
Merged

Log rewrite #107

merged 13 commits into from
May 18, 2024

Conversation

infeeeee
Copy link
Collaborator

@infeeeee infeeeee commented May 4, 2024

Final part of #90

  • Full rewrite of logging using the standard logging library, different log format for file and and console logging. Log levels follow standard conventions.
  • Log rotation: only the last 5 files remains, older files automatically deleted
  • Log settings in the configurator menu:
    • Console log level
    • If Console log should include time. Reason for this, if IoTuring is run as a service, the system log already adds a timestamp.
    • File log level
    • Enable/disable file log
    • Change the log dir
  • Settings are loaded twice with ConfiguratorLoader, this way logging can start before Configurator menu opened. File logging does not start before configuration loaded, early messages saved to a buffer, and saved to file only if file logging is enabled.
  • Terminal related functions collected in TerminalDetection.py

It's working, but it's possible that there are some bugs.

Fell free to edit if you have some better ideas.

resolves #58

@infeeeee infeeeee mentioned this pull request May 10, 2024
@infeeeee infeeeee marked this pull request as ready for review May 10, 2024 12:53
@infeeeee infeeeee requested a review from richibrics May 10, 2024 12:53
@infeeeee infeeeee mentioned this pull request May 10, 2024
5 tasks
@richibrics
Copy link
Owner

Finally we're using logging :) Also great work with the settings for the log. Thank you so much

@infeeeee infeeeee merged commit 80777d4 into richibrics:main May 18, 2024
1 check passed
@infeeeee infeeeee deleted the log-rewrite branch May 18, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change folder for Logs like we did for configurations
2 participants